﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type Button}">
        <Setter Property="Padding" Value="15 2 15 2"/>
        <Setter Property="Margin" Value="0 10 10 10"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>
    
    <Style TargetType="{x:Type Button}" x:Key="LeftButton">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0 5 0 0"/>
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Image Name="ButtonLeftEnabled" Source="/WgpgCore;component/Images/arrow_left.png"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="RightButton">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0 5 0 0"/>
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Image Name="ButtonRightEnabled" Source="/WgpgCore;component/Images/arrow_right.png"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="AddButton">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0 5 0 0"/>
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Image Name="ButtonAddEnabled" Source="/WgpgCore;component/Images/add.png"/>
                        <Image Name="ButtonAddDisabled" Source="/WgpgCore;component/Images/add_disabled.png" Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ButtonAddEnabled" Property="Visibility" Value="Hidden"/>
                            <Setter TargetName="ButtonAddDisabled" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="RemoveButton">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0 5 0 0"/>
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Image Name="ButtonRemoveEnabled" Source="/WgpgCore;component/Images/remove.png"/>
                        <Image Name="ButtoRemoveDisabled" Source="/WgpgCore;component/Images/remove_disabled.png" Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ButtonRemoveEnabled" Property="Visibility" Value="Hidden"/>
                            <Setter TargetName="ButtoRemoveDisabled" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="{x:Type ListBoxItem}" x:Key="CheckListItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Grid>
                        <CheckBox Name="ListItemCheckbox"/>
                        <TextBlock Text="{Binding Path=UserInfos[0].FullInfo}" Margin="20 0 0 0"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="IsChecked" TargetName="ListItemCheckbox" Value="True"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
